import request from '@/utils/request'

// 查询用药记录列表
export function listUsage(query) {
    return request({
        url: '/usage/usage/list',
        method: 'get',
        params: query
    })
}

// 查询用药记录详细
export function getUsage(id) {
    return request({
        url: '/usage/usage/' + id,
        method: 'get'
    })
}

// 新增用药记录
export function addUsage(data) {
    return request({
        url: '/usage/usage',
        method: 'post',
        data: data
    })
}

// 修改用药记录
export function updateUsage(data) {
    return request({
        url: '/usage/usage',
        method: 'put',
        data: data
    })
}

// 删除用药记录
export function delUsage(id) {
    return request({
        url: '/usage/usage/' + id,
        method: 'delete'
    })
}
